import java.util.Scanner;

public class MenuSelection {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int choice = 0;

        while (true) {
            System.out.println("请选择：");
            System.out.println("1：登陆");
            System.out.println("2：注册");
            System.out.println("3：联系客服");
            System.out.print("请输入选项（1-3）：");

            try {
                choice = Integer.parseInt(scanner.nextLine());
                if (choice == 1) {
                    System.out.println("您选择了登陆。");
                    break;
                } else if (choice == 2) {
                    System.out.println("您选择了注册。");
                    break;
                } else if (choice == 3) {
                    System.out.println("您选择了联系客服。");
                    break;
                } else {
                    System.out.println("输入的选项不存在，请重新输入。");
                }
            } catch (NumberFormatException e) {
                System.out.println("输入错误，请输入数字。");
            }
        }

        scanner.close();
    }
}